﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RussiaLibrary
{
    class ZPolygans : Class_Polygon
    {
        public override bool Init(byte[,] Bytes_TetrisByte)//重写Z形方块变形方法；
        { 
            bool ret = false;
            State = Class_Common.GetRandomInt() % 4;
            Console.WriteLine("ZPolygans State={0}", State);
            switch (State)
            {
                case 0://z
                    ret = InitBase(Bytes_TetrisByte, new KeyValuePair<int, int>(0, 4), new KeyValuePair<int, int>(0, 5),
                                                 new KeyValuePair<int, int>(1, 5), new KeyValuePair<int, int>(1, 6));
                    break;
                case 1://反z
                    ret =  InitBase(Bytes_TetrisByte, new KeyValuePair<int, int>(1, 4), new KeyValuePair<int, int>(1, 5),
                                                new KeyValuePair<int, int>(0, 5), new KeyValuePair<int, int>(0, 6));
                    break;
                case 2:
                    ret = InitBase(Bytes_TetrisByte, new KeyValuePair<int, int>(0, 5), new KeyValuePair<int, int>(1, 5),
                                                 new KeyValuePair<int, int>(1, 4), new KeyValuePair<int, int>(2, 4));
                    break;
                case 3:
                    ret = InitBase(Bytes_TetrisByte, new KeyValuePair<int, int>(0, 4), new KeyValuePair<int, int>(1, 4),
                                                new KeyValuePair<int, int>(1, 5), new KeyValuePair<int, int>(2, 5));
                    break;
                default:
                    break;
            }
            return ret;
        }
    }
}
